package ch1strings;

import java.util.Arrays;

public class Ex4 {

	public static boolean anagram(String s, String t) {
		char[] carr = s.toCharArray();
		char[] tarr = t.toCharArray();
		Arrays.sort(carr);
		Arrays.sort(tarr);
		return Arrays.equals(carr, tarr);
	}
	
	public static void main(String ...strings) {
		boolean anagram = anagram("abc", "cba");
		System.out.println(anagram);
	}
	
}
